#!/usr/bin/env bash

HERE=$PWD
SERVER_BASEPATH=$GOPATH/src/github.com/minio/minio
CLIENT_BASEPATH=$GOPATH/src/github.com/minio/mc


function build_server() {
    cd $SERVER_BASEPATH
    GO111MODULE=on CGO_ENABLED=1 go build -o minio main.go
}

function build_client() {
    cd $CLIENT_BASEPATH
    make build
    cd $HERE
}

function copy() {
    cp $1 $2
}

#copy $BASEPATH/minio ansible/roles/server/files/minio


build_client
copy $CLIENT_BASEPATH/mc $HERE/ansible/roles/client/files/
